package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.entity.Category;
import org.apache.ibatis.annotations.*;

import java.util.List;
import java.util.Map;

@Mapper
public interface CategoryMapper {
    Page<Category> page(String name, Integer type);

    void insert(Category category);

    void update(Category category);

    @Delete("delete from category where id = #{id}")
    void delete(Long id);


    List<Category> list(Integer type);

    @Select("select name from category where id = #{categoryId}")
    String getNameById(Long categoryId);


}
